var api = require('../../util/api.js');
Page({
  data: {

  },
  onLoad: function () {
    this.setData({
      examineId: api.chain().examineId,
      examineName: api.chain().examineName,
      wx0601: api.hasPerm('lhjd:wx:06:01'),
      wx0602: api.hasPerm('lhjd:wx:06:02'),
      wx0603: api.hasPerm('lhjd:wx:06:03'),
      wx0604: api.hasPerm('lhjd:wx:06:04'),
      wx0605: api.hasPerm('lhjd:wx:06:05'),
      wx0606: api.hasPerm('lhjd:wx:06:06'),
      wx0607: api.hasPerm('lhjd:wx:06:07'),
      wx0608: api.hasPerm('lhjd:wx:06:08'),
      wx0609: api.hasPerm('lhjd:wx:06:09'),
      wx0610: api.hasPerm('lhjd:wx:06:10'),
      wx0611: api.hasPerm('lhjd:wx:06:11')
    })
  },
  onShow: function () {

  },
  //现场管理
  goXCGL() {
    api.chain({
      khtype: 'xckhb'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //资料管理
  goZLGL() {
    api.chain({
      khtype: 'zhkhb'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //防火防爆
  goFHFB() {
    api.chain({
      khtype: 'fhfbb'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //劳动纪律
  goLDJL() {
    api.chain({
      khtype: 'ldjlb'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //井控安全
  goJKAQ() {
    api.chain({
      khtype: 'jkaq'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //考试成绩
  goKSCJ() {
    api.chain({
      khtype: 'kscj'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //监督互评
  goJDHP() {
    api.chain({
      judgeId: api.getSysUser().userId,
      khtype: 'jdhpb'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //施工单位评分
  goSGDWPF() {
    api.chain({
      judgeId: api.getSysUser().userId,
      khtype: 'sgdwpfb'
    });
    wx.navigateTo({
      url: `../player/list`
    })
  },
  //整改单份数
  goZGDFS() {
    api.chain({
      khtype: 'zgd'
    });
    api.get(api.url.wtmxbList, {
      examineId: api.chain().examineId
    }).then(res => {
      wx.navigateTo({
        url: `../player/list`
      })
    })
  },
  //发现问题数量
  goWTSL() {
    api.chain({
      khtype: 'wtsl'
    });
    api.get(api.url.wtmxbList, {
      examineId: api.chain().examineId
    }).then(res => {
      wx.navigateTo({
        url: `../player/list`
      })
    })
  },
  //罚款单数量
  goFDFS() {
    api.chain({
      khtype: 'fdfs'
    });
    api.get(api.url.gcfkbList, {
      examineId: api.chain().examineId
    }).then(res => {
      wx.navigateTo({
        url: `../player/list`
      })
    })
  }

});